/*
* 定义一个Schema
 */

const db = require('./db.js'),
	Schema = db.Schema;


let userSchema = new Schema({
	nickname :  String , //用户账号
    openid: String, //用户openId
    cardList: {
    	type: Array,
    	default: []
    }, //卡券
    subject: {
    	type: Array,
    	default: []
    }, //课程
    payList: {
    	type: Array,
    	default: []
    }, //购买
    unionId: String, //unionId 用户唯一标志
    clockIn: {
    	type: Array,
    	default: []
    }  //打卡时间

})

module.exports = db.model('user',userSchema);
